<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>封条管理及验证系统--报关行/货代</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="<%=request.getContextPath()%>/css/cssCn.css" type="text/css" rel="stylesheet">
<%@ include file="/comm.jsp"%>
<script language="JavaScript">
	function pidChange(pidVal){
		var cid=$d("cid");
		cid.options.length = 0;
		if(pidVal=="-1")
			return;
		
		var params = {
					pid:pidVal
					};
		$.ajax({type: "POST",
		       url: "ajax_loadCityByPid.do",
		       data: params,
		       async: true,
		       success: function(result){
				 if(result.retcode=='0000'){
				    var cityList = result.cityList;
				    cid.options[0] = new Option('请选择','-1');
					for(var i=0;i<cityList.length;i++){
						var city=cityList[i];
						cid.options[i+1] = new Option(city.name,city.id.id);
					}	
				 }
			  }
			},"json");
	}
</script>
	<style type="text/css">
	<!--
	fieldset {
	    padding:10px;
	    margin:10px;
	    width:270px;
	    color:#333; 
	} 
	legend {
	    color:#06c;
	    font-weight:800; 
	} 
		-->
	</style>
<body leftmargin="0" topmargin="0" marginheight="0" >
  <s:form name ="formpage" action="agentInfo_save" namespace="/">
  	<s:token>
	</s:token>
	<div>
	<s:hidden id="hdfId" name="agentInfo.id" value="%{#request.agentInfo.id}" />
  	<%@ include file="/messages.jsp"%>
			<fieldset>
				<legend>
					报关行、物流货代维护
				</legend>
				<table width="600">
					<tr>
						<td align="right">
							类型：
						</td>
						<td>
								<table width="300">
									<tr>
										<td>
											<s:select list="#{'01':'报关行','02':'货代'}"
												name="agentInfo.type" value="#request.agentInfo.type"
												id="lang" cssStyle="width:80px">
											</s:select>
										</td>
										<td align="right">
											语言：
										</td>
										<td>
											<s:select list="#{'zh_CN':'中文','en':'英文'}"
												name="agentInfo.lang" value="#request.agentInfo.lang"
												id="lang" cssStyle="width:80px">
											</s:select>
										</td>
								</table>
						</td>
					</tr>
					<tr>
						<td align="right">
							区域：
						</td>
						<td>
							<s:select list="#request.pidList"
							 	headerKey="-1" headerValue="请选择" 
								name="agentInfo.pid" value="#request.agentInfo.pid"
								onchange="pidChange(this.value);"
								id="pid" cssStyle="width:120px">
							</s:select>
						
							<s:select list="#request.cidList"
								name="agentInfo.cid" value="#request.agentInfo.cid"
								id="cid" cssStyle="width:150px">
							</s:select>
						</td>
					</tr>
					<tr>
						<td align="right" width="100">
							公司名称：
						</td>
						<td >
							<input name="agentInfo.companyName" type="text" value="${agentInfo.companyName }"
							 maxlength="40" size="35" class="required"  title="*必填" />
						</td>
					</tr>
					<tr>
						<td align="right">
							电话：
						</td>
						<td>
							<input name="agentInfo.telNumber" type="text" maxlength="20" size="20"
								value="${agentInfo.telNumber }" />
						</td>
					</tr>
					<tr>
						<td align="right">
							传真：
						</td>
						<td>
							<input name="agentInfo.faxNumber" type="text" maxlength="20" size="20"
								value="${agentInfo.faxNumber }" />
						</td>
					</tr>
					<tr>
						<td align="right">
							地址：
						</td>
						<td >
							<input name="agentInfo.address" type="text" maxlength="40" size="35"
								value="${agentInfo.address }" />
						</td>
					</tr>
					<tr>
						<td align="right">
							公司主页：
						</td>
						<td>
							<input name="agentInfo.webSite" type="text" maxlength="30" size="35"
								value="${agentInfo.webSite }" />
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">
							公司简介：
						</td>
						<td >
							<textarea id="content" name="agentInfo.introduction" rows="10" cols="80">${agentInfo.introduction }</textarea>
						</td>
					</tr>
					<!-- 
					<tr>
						<td align="right">
							排序序号：
						</td>
						<td>
							<input name="agentInfo.orderNum" type="text" maxlength="6" size="8"
								value="${agentInfo.orderNum }" />
						</td>
					</tr>
					 -->
					<tr>
						<td colspan="2" align="center">
							<input type="submit" class="button" id="ok" name="ok"
								value=" 保 存 " />
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="button" class="button" id="resets" value=" 返 回 " onclick="javascript:history.go(-1)"/>
						</td>
					</tr>
				</table>
			</fieldset>
			</div>
		</s:form>
  </body>
</html>